/**
 * 
 */
package tests.client;

import tests.client.resources.GlobalResources;

import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.Image;

/**
 * @author Thien
 *
 */
public class Header1 extends Composite {
	public Header1() {
		
		FlexTable flexTable = new FlexTable();
		
		Image logo = new Image(GlobalResources.INSTANCE.logoSmall());
		flexTable.setWidget(0, 0, logo);
		
		/*Label tagLine = new Label("Your feeds are belong to us");
		flexTable.setWidget(0, 1, tagLine);
		
		Label welcome = new Label("Welcome back foo@bar - ");
		flexTable.setWidget(0, 2, welcome);*/
		
		flexTable.setText(0, 1, "Your feeds are belong to us");
		flexTable.setText(0, 2, "Welcome back foo@bar - ");
		
		Anchor logOut = new Anchor("Log Out");
		flexTable.setWidget(0, 3, logOut);
		
		// styles
		flexTable.addStyleName(GlobalResources.INSTANCE.globalStyles().html());
		flexTable.getCellFormatter().addStyleName(0, 0, GlobalResources.INSTANCE.globalStyles().html());
		flexTable.getCellFormatter().addStyleName(0, 1, GlobalResources.INSTANCE.globalStyles().html());
		flexTable.getCellFormatter().addStyleName(0, 1, GlobalResources.INSTANCE.globalStyles().tagLine());
		flexTable.getCellFormatter().addStyleName(0, 2, GlobalResources.INSTANCE.globalStyles().html());
		flexTable.getCellFormatter().addStyleName(0, 2, GlobalResources.INSTANCE.globalStyles().welcomeDiv());
		flexTable.getCellFormatter().addStyleName(0, 3, GlobalResources.INSTANCE.globalStyles().html());
		logo.addStyleName(GlobalResources.INSTANCE.globalStyles().logoSmall());
		/*tagLine.addStyleName(GlobalResources.INSTANCE.globalStyles().tagLine());
		welcome.addStyleName(GlobalResources.INSTANCE.globalStyles().welcomeDiv());*/
		logOut.addStyleName(GlobalResources.INSTANCE.globalStyles().logOut());
		
		initWidget(flexTable);
	}

}
